package com.glodon.paas.account.dao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.glodon.paas.account.api.bean.Member;
import com.glodon.paas.account.api.bean.Org;

public interface OrgMapper {
    int deleteById(String id);

    int insert(Org record);

    Org selectById(String id);

    List<Org> selectByOwner(String owner);

    int updateByPrimaryKeySelective(Org record);

    void insertMember(Member member);

    void deleteMemeber(@Param("orgId") String orgId, @Param("userId") String userId);

    Org getOrgByOwnerParentName(Org org);

    void updateById(Org org);

    List<Org> selectByParentId(@Param("parentId") String parentId);

    List<Org> getSubOrgsWithMember(String id);
    List<Org> getSubOrgsWithMembers(String id);
    List<Org> getSubOrgs(String id);

    void updateOrgMember(@Param("status") int status, @Param("userId") String userId,
            @Param("inviteCode") String inviteCode);

    void deleteMemeberByEmail(@Param("orgId") String orgId, @Param("email") String email);

    void deleteMemeberByMobile(@Param("orgId") String orgId, @Param("mobile") String mobile);

    Member getNoRegOrgMember(@Param("email") String email, @Param("inviteCode") String inviteCode);

    void updateMemberUserId(@Param("userId") String userId,@Param("email") String email);

    Member getOrgMemberByEmail(@Param("orgId") String orgId,@Param("email") String email);

    void updateOrgMemberUpdateTime(Member member);
}
